<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '用户管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>



    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            // ['class' => 'yii\grid\SerialColumn'],

            // 'uid',
            ['attribute'=>'uid',
            'contentOptions'=>['width'=>'30px'],
            ],			
            'username',
			// 'auth_key',
            // 'password_hash',
            'email:email',
            'credit',
            // 'groupid',
			 ['attribute'=>'groupid',
        	'label'=>'分组',
        	'value'=>'group.grouptitle',
    		],
			// 'status',
            [
            		'attribute'=>'status',
            		'value'=>'statusStr',
            ],			
            // 'createnum',
            // 'editnum',
	        // 'password_reset_token', 
            // 'status'
            ['class' => 'yii\grid\ActionColumn',
			     'template'=>'{update}'
			],
        ],
    ]); ?>
</div>
